<?php
namespace app\index\controller;

use think\Controller;
use think\Db;

class Index extends Controller
{
    public function index()
    {
        $avg=Db::name('avg')->select();
        $productcate=Db::name('product_cate')->select();
        $product=Db::name('product')->select();
        $news=Db::name('news')->select();
        $newscate=Db::name('news_cate')->select();
        $banner=Db::name('banner')->select();
        //var_dump($data);die();


        $this->assign('avg',$avg);
        $this->assign('productcate',$productcate);
        $this->assign('product',$product);
        $this->assign('news',$news);
        $this->assign('newscate',$newscate);
        $this->assign('banner',$banner);

        return view('index');
        //return '<style type="text/css">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} a{color:#2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "Century Gothic","Microsoft yahei"; color: #333;font-size:18px;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }</style><div style="padding: 24px 48px;"> <h1>:)</h1><p> Tplay<br/><span style="font-size:30px">为开发者量身定制的高速度开发后台管理框架</span></p><span style="font-size:22px;"><br>【重要】【重要】【重要】Tplay后台管理框架目前没有开发index前台模块，请严格按照安装包中的安装说明进行安装！！';
    }
    public function pro(){
        $avg=Db::name('avg')->select();
        $this->assign('avg',$avg);


        $data=Db::name('news_cate')->select();
        //var_dump($data);die();
        $this->assign('data',$data);
        return $this->fetch();
    }
    public function news(){
        $avg=Db::name('avg')->select();
        $this->assign('avg',$avg);

        $data=Db::name('news_cate')->select();
        //var_dump($data);die();
        $this->assign('data',$data);
        return $this->fetch();
    }
    public function pro_more(){
        $data=Db::name('news_cate')->select();
        //var_dump($data);die();
        $this->assign('data',$data);
        return $this->fetch();
    }
    public function job(){
        $avg=Db::name('avg')->select();
        $this->assign('avg',$avg);

        $data=Db::name('news_cate')->select();
        //var_dump($data);die();
        $this->assign('data',$data);
        return $this->fetch();
    }
    public function contact(){
        $data=Db::name('news_cate')->select();
        //var_dump($data);die();
        $this->assign('data',$data);
        return $this->fetch();
    }

}
